package reflect;

import reflect.annotation.AutoRunClass;
import reflect.annotation.AutoRunMenthod;

//注解AutoRunClass要自己定义，在annotation包里
@AutoRunClass(34) //定义person这个类
public class person {

    private  String name = "张三";

    private int age = 22;

    public person(){}

    public  person(String name,int age){
        this.age = age;
        this.name = name;
    }

    //注解AutoRunMenthod要自己定义，在annotation包里
    @AutoRunMenthod(3)
    public  void sayHello(){
        System.out.println(name+":hello!");
    }
    public  void sayHi(){
        System.out.println(name+":hi!");
    }
    public  void sayhu(){
        System.out.println(name+":by!");
    }

    @AutoRunMenthod(2)
    public void watchTV(){
        System.out.println(name+":看电视！");
    }

    @AutoRunMenthod
    public void playGame(){
        System.out.println(name+":玩游戏！");
    }

    public void sio(){
        System.out.println(name+":吃鸡！");
    }

    public void sji(){
        System.out.println(name+":滑水！");
    }

    public void sop(){
        System.out.println(name+":划九九乘法表！");
    }

    public void say (String info){
        System.out.println(name+":"+info);
    }


    private void sd(){
        System.out.println("heihieihei");
    }


    public void say (String info,int count){
        for (int i = 0; i < count; i++) {
            System.out.println(name+":"+info);
        }
    }


    @Override
    public String toString() {
        return "person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
